package com.forum.service.talk;

import com.baomidou.mybatisplus.extension.service.IService;
import com.common.entity.ApiResult;
import com.common.entity.PageEntity;
import com.common.vo.LatestPosts;
import com.forum.param.TalkQueryParam;
import com.forum.pojo.talk.TalkList;

import java.util.List;
import java.util.Map;

/**
 * @author Tsing
 */
public interface TalkListService extends IService<TalkList> {

    /**
     * 创建论坛
     * @return ApiResult
     * @param talkList
     * **/
    ApiResult<String> createTalk(TalkList talkList);

    /**
     * 搜索论坛
     * @return ApiResult
     * @param param
     * **/
    ApiResult<Map<String, Object>> getTalks(TalkQueryParam param);

    /**
     * 获取当前用户管理的论坛
     * @return ApiResult
     * @param page
     * **/
    ApiResult<Map<String, Object>> getTalksByCurrentUser(PageEntity page);

    /**
     * 分页获取最近发布的帖子
     * @return ApiResult
     * @param pageEntity  分页参数
     */
    ApiResult<Map<String,Object>> getLatestTalks(PageEntity pageEntity);

    /**
     * 获取指定论坛的详情
     * @param talkId 论坛ID
     * @return
     */
    ApiResult<?> getTalkById(Long talkId);

    /**
     * 获取指定论坛的热门帖子
     * @param talkId 论坛ID
     * @return
     */
    ApiResult<?> getHotPostsBtTalk(Long talkId);
}
